package com.yegs.admin.business.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import com.yegs.admin.base.BaseEntity;

import java.io.Serializable;
import java.util.List;

/**
 * <p>
 * 
 * </p>
 *
 * @author yegs
 * @since 2020-08-20
 */
public class BaseRole extends BaseEntity<BaseRole> implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableField(exist = false)
    private List<BaseMenu> menus;


    public List<BaseMenu> getMenus() {
        return menus;
    }

    public void setMenus(List<BaseMenu> menus) {
        this.menus = menus;
    }

    /**
     * 角色ID
     */
    @TableId(value = "role_id", type = IdType.AUTO)
    private Integer roleId;

    /**
     * 角色名称
     */
    private String roleName;

    /**
     * 角色描述
     */
    private String roleDescribe;

    public Integer getRoleId() {
        return roleId;
    }

    public void setRoleId(Integer roleId) {
        this.roleId = roleId;
    }
    public String getRoleName() {
        return roleName;
    }

    public void setRoleName(String roleName) {
        this.roleName = roleName;
    }
    public String getRoleDescribe() {
        return roleDescribe;
    }

    public void setRoleDescribe(String roleDescribe) {
        this.roleDescribe = roleDescribe;
    }

    @Override
    protected Serializable pkVal() {
        return this.roleId;
    }

    @Override
    public String toString() {
        return "BaseRole{" +
            "roleId=" + roleId +
            ", roleName=" + roleName +
            ", roleDescribe=" + roleDescribe +
        "}";
    }
}
